var Request = require('../../lib/post');

module.exports = (method, params) => {
    return new Promise((resolve, reject) => {
        // setTimeout(() => {
        //     resolve({ msg: '侃侃， 好的呀', h2: '小标题',num : 1 })
        // }, 500)
        
        Request.Post('/auth/login', {"username": params.username, "password": params.password}).then(obj => {
            // return { h1: JSON.stringify(reslut) , h2: '小标题',num : 1 }
            console.info('await function return:', obj)
            // return { h1: '大标题', h2: '小标题',num : 1 }
            // return reslut
            resolve(obj)
        }, err => reject(err))
    })
}
				
